Modelica.Media.Interfaces.PartialMedium.FluidConstantsCritical, triple, molecular and other standard data of fluid
Modelica.Media.Interfaces.PartialMedium.prandtlNumberReturn the Prandtl number
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| PrandtlNumber | Pr | Prandtl number [1] |
Modelica.Media.Interfaces.PartialMedium.specificEntropyReturn specific entropy
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| SpecificEntropy | s | Specific entropy [J/(kg.K)] |
Modelica.Media.Interfaces.PartialMedium.specificGibbsEnergyReturn specific Gibbs energy
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| SpecificEnergy | g | Specific Gibbs energy [J/kg] |
Modelica.Media.Interfaces.PartialMedium.specificHelmholtzEnergyReturn specific Helmholtz energy
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| SpecificEnergy | f | Specific Helmholtz energy [J/kg] |
Modelica.Media.Interfaces.PartialMedium.heatCapacity_cpAlias for deprecated name
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| SpecificHeatCapacity | cp | Specific heat capacity at constant pressure [J/(kg.K)] |
Modelica.Media.Interfaces.PartialMedium.heatCapacity_cvAlias for deprecated name
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| SpecificHeatCapacity | cv | Specific heat capacity at constant volume [J/(kg.K)] |
Modelica.Media.Interfaces.PartialMedium.isentropicEnthalpyReturn isentropic enthalpy
This function computes an isentropic state transformation:
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p_downstream | Downstream pressure [Pa] | |
| ThermodynamicState | refState | Reference state for entropy |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h_is | Isentropic enthalpy [J/kg] |
Modelica.Media.Interfaces.PartialMedium.isobaricExpansionCoefficientReturn overall the isobaric expansion coefficient beta
beta is defined as 1/v * der(v,T), with v = 1/d, at constant pressure p.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| IsobaricExpansionCoefficient | beta | Isobaric expansion coefficient [1/K] |
Modelica.Media.Interfaces.PartialMedium.betaAlias for isobaricExpansionCoefficient for user convenience
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| IsobaricExpansionCoefficient | beta | Isobaric expansion coefficient [1/K] |
Modelica.Media.Interfaces.PartialMedium.isothermalCompressibilityReturn overall the isothermal compressibility factor
kappa is defined as - 1/v * der(v,p), with v = 1/d at constant temperature T.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| IsothermalCompressibility | kappa | Isothermal compressibility [1/Pa] |
Modelica.Media.Interfaces.PartialMedium.kappaAlias of isothermalCompressibility for user convenience
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| IsothermalCompressibility | kappa | Isothermal compressibility [1/Pa] |
Modelica.Media.Interfaces.PartialMedium.density_derp_hReturn density derivative w.r.t. pressure at const specific enthalpy
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| DerDensityByPressure | ddph | Density derivative w.r.t. pressure [s2/m2] |
Modelica.Media.Interfaces.PartialMedium.density_derh_pReturn density derivative w.r.t. specific enthalpy at constant pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| DerDensityByEnthalpy | ddhp | Density derivative w.r.t. specific enthalpy [kg.s2/m5] |
Modelica.Media.Interfaces.PartialMedium.density_derp_TReturn density derivative w.r.t. pressure at const temperature
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| DerDensityByPressure | ddpT | Density derivative w.r.t. pressure [s2/m2] |
Modelica.Media.Interfaces.PartialMedium.density_derT_pReturn density derivative w.r.t. temperature at constant pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| DerDensityByTemperature | ddTp | Density derivative w.r.t. temperature [kg/(m3.K)] |
Modelica.Media.Interfaces.PartialMedium.density_derXReturn density derivative w.r.t. mass fraction
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| Density | dddX[nX] | Derivative of density w.r.t. mass fraction [kg/m3] |
Modelica.Media.Interfaces.PartialMedium.molarMassReturn the molar mass of the medium
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| MolarMass | MM | Mixture molar mass [kg/mol] |
Modelica.Media.Interfaces.PartialMedium.specificEntropy_pTXReturn specific enthalpy from p, T, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| SpecificEntropy | s | Specific entropy [J/(kg.K)] |
Modelica.Media.Interfaces.PartialMedium.density_pTXReturn density from p, T, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| MassFraction | X[:] | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
Modelica.Media.Interfaces.PartialMedium.temperature_psXReturn temperature from p,s, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| Temperature | T | Temperature [K] |
Modelica.Media.Interfaces.PartialMedium.density_psXReturn density from p, s, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
Modelica.Media.Interfaces.PartialMedium.specificEnthalpy_psXReturn specific enthalpy from p, s, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | Specific enthalpy [J/kg] |
Modelica.Media.Interfaces.PartialMedium.setState_psXReturn thermodynamic state as function of p, s and composition X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
Modelica.Media.Interfaces.PartialMedium.setSmoothStateReturn thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b
This function is used to approximate the equation
state = if x > 0 then state_a else state_b;
by a smooth characteristic, so that the expression is continuous and differentiable:
state := smooth(1, if x > x_small then state_a else
if x < -x_small then state_b else f(state_a, state_b));
This is performed by applying function Media.Common.smoothStep(..) on every element of the thermodynamic state record.
If mass fractions X[:] are approximated with this function then this can be performed for all nX mass fractions, instead of applying it for nX-1 mass fractions and computing the last one by the mass fraction constraint sum(X)=1. The reason is that the approximating function has the property that sum(state.X) = 1, provided sum(state_a.X) = sum(state_b.X) = 1. This can be shown by evaluating the approximating function in the abs(x) < x_small region (otherwise state.X is either state_a.X or state_b.X):
X[1] = smoothStep(x, X_a[1] , X_b[1] , x_small);
X[2] = smoothStep(x, X_a[2] , X_b[2] , x_small);
...
X[nX] = smoothStep(x, X_a[nX], X_b[nX], x_small);
or
X[1] = c*(X_a[1] - X_b[1]) + (X_a[1] + X_b[1])/2
X[2] = c*(X_a[2] - X_b[2]) + (X_a[2] + X_b[2])/2;
...
X[nX] = c*(X_a[nX] - X_b[nX]) + (X_a[nX] + X_b[nX])/2;
c = (x/x_small)*((x/x_small)^2 - 3)/4
Summing all mass fractions together results in
sum(X) = c*(sum(X_a) - sum(X_b)) + (sum(X_a) + sum(X_b))/2
= c*(1 - 1) + (1 + 1)/2
= 1
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | m_flow or dp | |
| ThermodynamicState | state_a | Thermodynamic state if x > 0 | |
| ThermodynamicState | state_b | Thermodynamic state if x < 0 | |
| Real | x_small | Smooth transition in the region -x_small < x < x_small |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | Smooth thermodynamic state for all x (continuous and differentiable) |
Modelica.Media.Interfaces.PartialMedium.isentropicExponentReturn isentropic exponent
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| IsentropicExponent | gamma | Isentropic exponent [1] |
Modelica.Media.Interfaces.PartialMedium.velocityOfSoundReturn velocity of sound
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| VelocityOfSound | a | Velocity of sound [m/s] |
Modelica.Media.Interfaces.PartialMedium.specificEnthalpy_pTXReturn specific enthalpy from p, T, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | Specific enthalpy [J/kg] |
Modelica.Media.Interfaces.PartialMedium.temperature_phXReturn temperature from p, h, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| Temperature | T | Temperature [K] |
Modelica.Media.Interfaces.PartialMedium.density_phXReturn density from p, h, and X or Xi
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
Modelica.Media.Interfaces.PartialMedium.specificInternalEnergyReturn specific internal energy
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| SpecificEnergy | u | Specific internal energy [J/kg] |